package B.w.OOday03;
/** 医生:派生类 */
public class Doctor extends Person {
    String title;
    Doctor(String name,int age,String address,String title){
        super(name,age,address);
        this.title=title;
    }
    void cut(){
        System.out.println(name+"正在切人");
    }
    void sayHi(){
        System.out.println("你好我叫"+name+"，今年"+age+"岁了，住在"+address+"是一个一个一个"+title);
    }
































    /*String title;
    Doctor(String name,int age,String address,String title){
        super(name,age,address);
        this.title = title;
    }
    void cut(){
        System.out.println(name+"正在做手术...");
    }*/
}






















